package com.logger.Point;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
@Endpoint(id = "dataSource")
public class DataSourcePoint {
	@Value("${dataSource.username}")
	String username;
	@Value("${dataSource.password}")
    String password;
	Map<String, String> map = new HashMap<>();
	@ReadOperation
	Map<String, String> getDataSource() {
		map.put("username", username);
		map.put("password", password);
		return map;
	}
	@WriteOperation



















	void stopDataSource() {
		System.out.println("stop dataSource");
	}
}
